unity tilemap get all tiles

81

unity tilemap get all tiles -

foreach (var position in tilemap.cellBounds.allPositionsWithin) {
            if (!tilemap.HasTile(position)) {
                continue;
            }
 
            // Tile is not empty; do stuff
        }

Comments

Submit
0 Comments